package org.jivesoftware.smackx.pubsub.util;

import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smackx.pubsub.ConfigureForm;
import org.jivesoftware.smackx.pubsub.FormNode;
import org.jivesoftware.smackx.pubsub.PubSubElementType;
import org.jivesoftware.smackx.pubsub.packet.PubSubNamespace;

public class NodeUtils
{
  public static ConfigureForm getFormFromPacket(Packet paramPacket, PubSubElementType paramPubSubElementType)
  {
    return new ConfigureForm(((FormNode)paramPacket.getExtension(paramPubSubElementType.getElementName(), paramPubSubElementType.getNamespace().getXmlns())).getForm());
  }
}